import  os

inputPath=input('请输入要查找的路径:')
pattern=input('请输入要搜索的关键词:')

for dirpath,dirnames,filenames in os.walk(inputPath):
    print('-------------------')
    print(f'dirpath={dirpath}')
    print('dirnames:')
    for name in dirnames:
        print(name)
    print('filenames:')
    for name in filenames:
        print(name)
